The kernel compat syscall in the kernel got introduced with a broken
layout, which requires a pointer to the actual sigset_t variable but
with the size of the running kernel, not the size of the compat code.
This means that when the wrapper sends the expected compat (32-bit)
pointer, the kernel reads a 64-bit pointer, eating with it also the
sigset size member. And then proceeds to fail the comparison of the
sigset_t size and returns EINVAL.
This really needs to be fixed in the kernel, as there's no apparent
user of the broken compat layout (from codesearch.debian.org, nor a
quick github.com search). But we have to workaround it in libaio so
that we can use kernels that have not yet been fixed.
We do that, by trying the non-broken layout (that would be used with
a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL
we retry with a structure padded to what the kernel expects.
Sent-Upstream: rejected Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0015-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch
The LTO support cannot work properly when there are versioned symbols
via asm statements, as those are not seen by the compiler. Use the new
function attributes if supported instead of the asm statements.
We need to move the SYMVER calls after the function definitions
otherwise it will reference symbols not yet seen.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0006-Use-new-symver-function-attribute-to-support-LTO-bui.patch
[PATCH libaio 03/16] build: Honor user build flags
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
regardless of the user passing them over the environment or the
command-line. Any required flag that the build system needs, has to be
set in some other flag (which we will namespace with «MK_») so that the
build will use even if the user flags are passed, even though the user
should be able to override by appending after them. We pass CPPFLAGS to
any compilation command that missed them.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0003-build-Honor-user-build-flags.patch
[PATCH libaio 02/16] build: Fix DESTDIR and pathname variables handling
The convention for DESTDIR is that it is only prefixed during the
install target. In this case we postpone that to the inner Makefile
so that it can be invoked directly while preserving the expected
semantics. We should also prefer the user specified pathname variables
if already set in any way, and do not need to pass them explicitly
to the sub-make.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0002-build-Fix-DESTDIR-and-pathname-variables-handling.patch
Guillem Jover [Sun, 6 Aug 2023 19:12:34 +0000 (20:12 +0100)]
libaio (0.3.113-5) unstable; urgency=medium
* Wrap fields in debian/tests/control.
* Fix upstream build system to remove all test artifacts on clean.
Reported by Lucas Nussbaum <lucas@debian.org>.